<%--
  Created by IntelliJ IDEA.
  User: acoffee
  Date: 2021/11/1
  Time: 9:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html><head>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/index.css">
    <meta charset="UTF-8">
    <title>用户登录-蜗牛图书商城</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.4.1.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery.validate.min.js"></script>
    <script>
        // $(function(){
        //     $("form").validate({
        //         rules:{
        //             account:{
        //                 required:true,
        //                 isAccount:true
        //             },
        //             password:{
        //                 required:true,
        //                 isPassword:true
        //             }
        //         },
        //         messages:{
        //             account:{
        //                 required:'账号必须填写!',
        //                 isAccount:'2-20个字符,可以是字母,数字,下划线和中文!'
        //             },
        //             password:{
        //                 required:'密码必须填写!',
        //                 isPassword:'密码必须为6-32个数字,字母字符!'
        //             }
        //         }
        //     });
        //     $.validator.addMethod('isAccount',function(value,element){
        //         return this.optional(element) || /^[\w\u4E00-\u9FA5]{2,20}$/.test(value);
        //     });
        //     $.validator.addMethod('isPassword',function(value,element){
        //         return this.optional(element) || /^[0-9a-zA-Z]{6,32}$/.test(value);
        //     });
        // });
    </script>

</head>
<body>
<div class="brand_list container_2">
    <div class="header">
        <h1 class="logo">
            <a title="" style="background:url(${pageContext.request.contextPath}/images/logo.png);" href="${pageContext.request.contextPath}/pages/index.jsp">电子商务平台</a>
        </h1>
        <ul class="shortcut">
            <li class="first"><a href="${pageContext.request.contextPath}/pages/personal.jsp">个人中心</a></li>
            <li><a href="${pageContext.request.contextPath}/pages/myOrders.jsp">我的订单</a></li>
        </ul>
        <p class="loginfo">


            [<a href="${pageContext.request.contextPath}/pages/login.jsp">登录</a>
            <a class="reg" href="${pageContext.request.contextPath}/pages/register.jsp">免费注册</a>]

        </p>
    </div>

    <div class="wrapper clearfix">
        <div class="wrap_box">
            <h3 class="notice">已注册用户，请登录</h3>
            <p class="tips"></p>
            <div class="box login_box clearfix">
                <form action='${pageContext.request.contextPath}/user/login' method="post">
                    <div style="color: red ; padding-top:50px;padding-left : 120px">${msg}</div>
                    <input type="hidden" name="opr" value="login">
                    <table width="515" class="form_table f_l">
                        <colgroup><col width="120px">
                            <col>
                        </colgroup><tbody><tr>
                        <th>用户名：</th>
                        <td><input class="gray" type="text" name="username" id="username" placeholder="请输入用户名"><span id="namemsg"></span></td>
                    </tr>
                    <tr>
                        <th>密码：</th>
                        <td><input class="gray" type="password" id="password" name="password" placeholder="请输入密码"><span id="pwdmsg"></span></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input class="submit_login" type="submit" value="登录" id="loginbtn"></td>
                    </tr>
                    </tbody></table>
                </form>

                <!--正常登录时-->
                <table width="360px" class="form_table prompt_3 f_l">
                    <colgroup><col width="75px">
                        <col>
                    </colgroup><tbody><tr>
                    <th></th>
                    <td>
                        <p class="mt_10">
                            <strong class="f14">您还不是<span class="orange"></span>用户
                            </strong>
                        </p>
                        <p>
                            现在免费注册成为

                            用户，便能立即享受便宜又放心的购物乐趣。<a class="blue" href="${pageContext.request.contextPath}/pages/index.jsp">网站首页&gt;&gt;</a>
                        </p>
                        <p class="mt_10">
                            <a class="reg_btn" href="${pageContext.request.contextPath}/pages/register.jsp">注册新用户</a>
                        </p>
                    </td>
                </tr>
                </tbody></table>
            </div>
        </div>
    </div>
    <div class="footer">
        <p class="links">
            <a href="">关于我们</a>|<a href="">常见问题</a>|<a href="">安全交易</a>|<a href="">购买流程</a>|<a href="">如何付款</a>|<a href="">联系我们</a>|<a href="">合作提案</a>
        </p>
    </div>
</div>


</body></html>
